package com.kaifamiao.www.IP.do0928;

import java.io.IOException;
import java.net.*;
import java.util.Scanner;

public class UDPSend {
    public static void main(String[] args) throws IOException {

        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
//        String str = "你好，小菜鸡";
        byte[] bytes = new byte[]{10,0,2,70};
//        InetAddress address = InetAddress.getByName("cxd");
        InetAddress address = InetAddress.getByAddress(bytes);
        int port = 8888;
        DatagramPacket packet = new DatagramPacket(str.getBytes(),str.getBytes().length,address,port);

        DatagramSocket socket = new DatagramSocket();
        socket.send(packet);
        socket.close();
        System.out.println("发送完成");
    }
}
